<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>Title</title>
    <%@include file="../../../static/common/common.jsp" %>
    <script src="/static/js/employee.js"></script>
</head>
<body>
<table id="employee_datagrid"></table>
<div id="emp_btns">
    <shiro:hasPermission name="employee:saveOrUpdate">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    </shiro:hasPermission>
    <a id="changeState_btn" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       data-cmd="changeState">离职</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="openPassword">重置密码</a>
    <input class="easyui-textbox" name="keyword" prompt="请输入用户名或真实名称或电话">
    <input class="easyui-combobox"
           data-options="url:'/dept/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'" name="deptId">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="query"></a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-redo',plain:true" data-cmd="exportXls"></a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-tip',plain:true" data-cmd="import"></a>
</div>
<div id="save_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="save">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
</div>
<div id="password_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="resetPassword">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel2">取消</a>
</div>
<div id="import_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="import_save">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="import_cancel">取消</a>
</div>
<div id="emp_dialog">
    <form id="emp_form" method="post">
        <input id="empId" type="hidden" name="id">
        <table align="center" style="margin-top: 15px" cellspacing="10">
            <tr>
                <td>用户名:</td>
                <td><input class="easyui-textbox" name="username" prompt="请输入用户名"
                           validType="remote['/employee/validateUsername.do?id='+empId.value,'username']"
                           invalidMessage="用户名已存在"></td>
            </tr>
            <tr>
                <td>真实姓名:</td>
                <td><input class="easyui-textbox" name="realname"></td>
            </tr>
            <tr id="password_tr">
                <td>密码:</td>
                <td><input class="easyui-passwordbox" name="password"></td>
            </tr>
            <tr>
                <td>电话:</td>
                <td><input class="easyui-textbox" name="tel"></td>
            </tr>
            <tr>
                <td>邮箱:</td>
                <td><input class="easyui-textbox" name="email"></td>
            </tr>
            <tr>
                <td>部门:</td>
                <td><input class="easyui-combobox" name="dept.id"
                           data-options="url:'/dept/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>管理员:</td>
                <td><input class="easyui-combobox" name="admin"
                           data-options="data:[
                           {name:'是',value:'1'},{name:'否',value:'0'}],valueField:'value',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>入职时间:</td>
                <td><input class="easyui-datebox" name="hireDate"></td>
            </tr>
            <tr>
                <td>角色:</td>
                <td><input class="easyui-combobox" id="role_combobox"
                           data-options="multiple:true,url:'/role/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="reset_password">
    <form id="password_form">
        <input type="hidden" name="id">
        <table align="center" style="margin-top: 15px" cellspacing="10">
            <tr>
                <td>
                    原始密码:
                </td>
                <td>
                    <input class="easyui-passwordbox" disabled="true" name="password">
                </td>
            </tr>
            <tr>
                <td>
                    新密码:
                </td>
                <td>
                    <input class="easyui-passwordbox" name="newPassword">
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="import_dialog">
    <form id="import_form" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                <a class="easyui-linkbutton" data-options="iconCls:'icon-tip'"></a>
            </tr>
            <tr>
                <input  type="file" value="上传" name="file">
            </tr>
        </table>
    </form>
</div>
</body>
</html>
